using DA.AnimGraph;
using System;
using System.Collections.Generic;
using UnityEngine;

namespace DA.AnimGraph.Editor {
    /// <summary>
    /// 收集所有添加 BlackboardStructAttribute 特性的类型
    /// </summary>
    public class BlackboardTypeRegister : MonoBehaviour {
        private static BlackboardTypeRegister instance;
        public static BlackboardTypeRegister GetInstance() {
            if (instance == null) {
                instance = new();
            }
            return instance;
        }
        public List<(Type, BlackboardStructAttribute)> blackboardStructTypes { get; private set; }
        private BlackboardTypeRegister() {
            blackboardStructTypes = TypeRegisterUtility.GetAllClassesByAttribute<BlackboardStructAttribute>();
        }
    }
}
